/**********************************************************************
* File: sine256Q15.c                                                  *
* Description: 256 point sine wave in I1Q15 format.  Positive valued  *
*   only.  The values are amplitude and offset scaled.                *
* Devices: TMS320F28xx                                                *
* Author: David M. Alter, Texas Instruments Inc.                      *
* History:                                                            *
*   02/07/06 - original (D. Alter)                                    *
**********************************************************************/

#include "DSP280x_Device.h"					// Peripheral address definitions
#include "f2808_HRPWM_DAC.h"				// Include file specific to this project
#include "User_define.h"

// AMPLITUDE, OFFSET, Q15_scale + set, and PWM_VOLTAGE are defined in f2808_HRPWM_DAC.h
#define scale     AMPLITUDE1/PWM_VOLTAGE
#define set       Q15_SCALE *OFFSET/PWM_VOLTAGE

/*********************************************************************/
const unsigned int sine256Q15[] = {
16384u*scale + set, 16786u*scale + set, 17187u*scale + set, 17589u*scale + set, 17989u*scale + set,
18389u*scale + set, 18787u*scale + set, 19184u*scale + set, 19580u*scale + set, 19973u*scale + set,
20364u*scale + set, 20753u*scale + set, 21139u*scale + set, 21523u*scale + set, 21903u*scale + set,
22280u*scale + set, 22653u*scale + set, 23023u*scale + set, 23388u*scale + set, 23750u*scale + set,
24107u*scale + set, 24459u*scale + set, 24806u*scale + set, 25149u*scale + set, 25486u*scale + set,
25817u*scale + set, 26143u*scale + set, 26463u*scale + set, 26777u*scale + set, 27085u*scale + set,
27386u*scale + set, 27681u*scale + set, 27968u*scale + set, 28249u*scale + set, 28523u*scale + set,
28789u*scale + set, 29048u*scale + set, 29299u*scale + set, 29543u*scale + set, 29778u*scale + set,
30006u*scale + set, 30225u*scale + set, 30436u*scale + set, 30639u*scale + set, 30832u*scale + set,
31018u*scale + set, 31194u*scale + set, 31361u*scale + set, 31520u*scale + set, 31669u*scale + set,
31809u*scale + set, 31940u*scale + set, 32062u*scale + set, 32174u*scale + set, 32276u*scale + set,
32369u*scale + set, 32452u*scale + set, 32526u*scale + set, 32590u*scale + set, 32644u*scale + set,
32688u*scale + set, 32723u*scale + set, 32747u*scale + set, 32762u*scale + set, 32767u*scale + set,
32762u*scale + set, 32747u*scale + set, 32723u*scale + set, 32688u*scale + set, 32644u*scale + set,
32590u*scale + set, 32526u*scale + set, 32452u*scale + set, 32369u*scale + set, 32276u*scale + set,
32174u*scale + set, 32062u*scale + set, 31940u*scale + set, 31809u*scale + set, 31669u*scale + set,
31520u*scale + set, 31361u*scale + set, 31194u*scale + set, 31018u*scale + set, 30832u*scale + set,
30639u*scale + set, 30436u*scale + set, 30225u*scale + set, 30006u*scale + set, 29778u*scale + set,
29543u*scale + set, 29299u*scale + set, 29048u*scale + set, 28789u*scale + set, 28523u*scale + set,
28249u*scale + set, 27968u*scale + set, 27681u*scale + set, 27386u*scale + set, 27085u*scale + set,
26777u*scale + set, 26463u*scale + set, 26143u*scale + set, 25817u*scale + set, 25486u*scale + set,
25149u*scale + set, 24806u*scale + set, 24459u*scale + set, 24107u*scale + set, 23750u*scale + set,
23388u*scale + set, 23023u*scale + set, 22653u*scale + set, 22280u*scale + set, 21903u*scale + set,
21523u*scale + set, 21139u*scale + set, 20753u*scale + set, 20364u*scale + set, 19973u*scale + set,
19580u*scale + set, 19184u*scale + set, 18787u*scale + set, 18389u*scale + set, 17989u*scale + set,
17589u*scale + set, 17187u*scale + set, 16786u*scale + set, 16384u*scale + set, 15981u*scale + set,
15580u*scale + set, 15178u*scale + set, 14778u*scale + set, 14378u*scale + set, 13980u*scale + set,
13583u*scale + set, 13187u*scale + set, 12794u*scale + set, 12403u*scale + set, 12014u*scale + set,
11628u*scale + set, 11244u*scale + set, 10864u*scale + set, 10487u*scale + set, 10114u*scale + set,
 9744u*scale + set,  9379u*scale + set,  9017u*scale + set,  8660u*scale + set,  8308u*scale + set,
 7961u*scale + set,  7618u*scale + set,  7281u*scale + set,  6950u*scale + set,  6624u*scale + set,
 6304u*scale + set,  5990u*scale + set,  5682u*scale + set,  5381u*scale + set,  5086u*scale + set,
 4799u*scale + set,  4518u*scale + set,  4244u*scale + set,  3978u*scale + set,  3719u*scale + set,
 3468u*scale + set,  3224u*scale + set,  2989u*scale + set,  2761u*scale + set,  2542u*scale + set,
 2331u*scale + set,  2128u*scale + set,  1935u*scale + set,  1749u*scale + set,  1573u*scale + set,
 1406u*scale + set,  1247u*scale + set,  1098u*scale + set,   958u*scale + set,   827u*scale + set,
  705u*scale + set,   593u*scale + set,   491u*scale + set,   398u*scale + set,   315u*scale + set,
  241u*scale + set,   177u*scale + set,   123u*scale + set,    79u*scale + set,    44u*scale + set,
   20u*scale + set,     5u*scale + set,     0u*scale + set,     5u*scale + set,    20u*scale + set,
   44u*scale + set,    79u*scale + set,   123u*scale + set,   177u*scale + set,   241u*scale + set,
  315u*scale + set,   398u*scale + set,   491u*scale + set,   593u*scale + set,   705u*scale + set,
  827u*scale + set,   958u*scale + set,  1098u*scale + set,  1247u*scale + set,  1406u*scale + set,
 1573u*scale + set,  1749u*scale + set,  1935u*scale + set,  2128u*scale + set,  2331u*scale + set,
 2542u*scale + set,  2761u*scale + set,  2989u*scale + set,  3224u*scale + set,  3468u*scale + set,
 3719u*scale + set,  3978u*scale + set,  4244u*scale + set,  4518u*scale + set,  4799u*scale + set,
 5086u*scale + set,  5381u*scale + set,  5682u*scale + set,  5990u*scale + set,  6304u*scale + set,
 6624u*scale + set,  6950u*scale + set,  7281u*scale + set,  7618u*scale + set,  7961u*scale + set,
 8308u*scale + set,  8660u*scale + set,  9017u*scale + set,  9379u*scale + set,  9744u*scale + set,
10114u*scale + set, 10487u*scale + set, 10864u*scale + set, 11244u*scale + set, 11628u*scale + set,
12014u*scale + set, 12403u*scale + set, 12794u*scale + set, 13187u*scale + set, 13583u*scale + set,
13980u*scale + set, 14378u*scale + set, 14778u*scale + set, 15178u*scale + set, 15580u*scale + set,
15981u*scale + set
};

/*** end of file *****************************************************/
